<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="cn.firstsoft.modules.portlet.domain.PortletCityWeather" table="portlet_city_weather">
      <id name="id" type="integer">
            <column name="id" />
            <generator class="native" >
				         <param name="sequence">PORTLET_CITY_WEATHER_ID_SEQ</param>
            </generator>
        </id>
        <property name="name" type="string">
               <column name="name" length="100" />
        </property>
        <property name="weatherId" type="string">
               <column name="weather_id" length="100" />
        </property>
             
		<many-to-one name="parentCity" cascade="save-update"
			class="cn.firstsoft.modules.portlet.domain.PortletCityWeather" fetch="select">
			<column name="parent_id" />
		</many-to-one> 
       
    </class>
</hibernate-mapping>
